<?php /* Template Name: Blank - DEALER PORTAL HOME */ ?>

<?php include ('header-blank.php'); ?>

<style>
.wpdealercontent h3 { font-size: 15px; }
.wpdealercontent h3 a, .wpdealercontent h3 a:visited { color: #e77d1d; text-decoration: none; }
    .wpdealercontent h3 a:hover { color: #002d55; }
	.wpdealercontent ul.videolist { list-style: none; padding: 0px; margin: 0px; }
		.wpdealercontent ul.videolist li { display: inline-block; float: left; margin:0px; text-align: center; }
			.wpdealercontent ul.videolist li:hover { background-color: #f2f2f2; }
			.wpdealercontent ul.videolist li a, .wpdealercontent ul.videolist li a:visited { display: inline-block; width: 172px; padding: 10px; margin: 0px; text-decoration: none; }
				.wpdealercontent ul.videolist li a img { width: 168px; height: 126px; border: #cccccc 2px solid; margin-bottom: 10px; }
				.wpdealercontent ul.videolist li a span { color: #002d55; text-decoration: none; font-size: 14px; font-weight: bold; }
					.wpdealercontent ul.videolist li:hover a span { color: #e77d1d; }
		.wpdealercontent ul.vertlist { list-style: none; padding: 0px; margin: 0px; }
			.wpdealercontent ul.vertlist li { display: block; margin: 0px; border-bottom: #cccccc 1px dashed; }
				.wpdealercontent ul.vertlist li:hover { background-color: #f2f2f2; }
				.wpdealercontent ul.vertlist li a, .wpdealercontent ul.vertlist li a:visited { display: block; width: 96%; height: 80px; padding: 2%; text-decoration: none; }
					.wpdealercontent ul.vertlist li a img { width: 76px; height: 76px; float: left; margin: 0px; margin-right: 20px; border: #cccccc 2px solid; }
						.wpdealercontent ul.vertlist li a span { color: #002d55; text-decoration: none; font-size: 14px; font-weight: bold; }
							.wpdealercontent ul.vertlist li:hover a span { color: #e77d1d; }
							
input[type=submit] { width:200px;height:40px;line-height:40px;text-align:center;font-size:15px;font-weight:bold; }
			
<?php if(is_page(6815)) { ?>
	.wpdealercontent { height:900px; }
<? } elseif(is_page(6220)) { ?>
	.wpdealercontent { height:1600px; }
<?php } ?>

</style>

<div class='wpdealercontent' style='width: 960px; clear: both; margin-left: auto; margin-right: auto; font-family: arial;'>

	<?php // DEALER PROJECT SUBMISSION PAGE CONTENT
    	if(is_page(6815)) { ?>
			<?php echo do_shortcode('[contact-form 30 "InstallerProjectSubmissionForm"]'); ?>
	<?php } ?>

	<?php // DEALER PORTAL HOMEPAGE CONTENT
    	if(is_page(6220)) { ?>
	<div style='width:100%;padding-bottom:20px;border-bottom:#cccccc 1px solid;margin-bottom:20px;'>
		<h3>Recent SunMaxx Webinars | <span><a href='http://www.sunmaxxsolar.com/solar-thermal-training-webinars.php' target='_blank'>View All</a></span></h3>
        <ul class='videolist'>
        <?php
			$catquery = new WP_Query( 'cat=120&posts_per_page=5' );
			while($catquery->have_posts()) : $catquery->the_post();
		?>
        	<li><a href='<?php the_permalink(); ?>' target='_blank'>
            	<img src='http://i3.ytimg.com/vi/<?php echo get_post_meta($post->ID, 'YouTubeVideo', true) ?>/0.jpg' alt='<?php the_title(); ?>' alt='<?php the_title(); ?>' />
                <span><?php the_title(); ?></span>
            </a></li>
        <?php endwhile; ?>
        <div style='width: 100%; height: 0px; clear: both;'></div>
        </ul>
	</div>
    
    <div style='width:100%;padding-bottom:20px;border-bottom:#cccccc 1px solid;margin-bottom:20px; clear: both;'>
		<h3>Recent SunMaxx Reference Projects | <span><a href='http://www.sunmaxxsolar.com/sunmaxx-solar-projects.php' target='_blank'>View All</a></span></h3>
        <ul class='videolist'>
        	<li><a href='http://www.sunmaxxsolar.com/residential-solar-thermal-reference-projects.php' target='_blank'>
				<img src="http://www.sunmaxxsolar.com/wp-content/themes/SunMaxxSolar/images/refprojects-residential.jpg" alt="Residential SunMaxx Solar Thermal Reference Projects" />
                <span>Residential Reference Projects</span>
            </a></li>
            <li><a href='http://www.sunmaxxsolar.com/commercial-solar-thermal-reference-projects.php' target='_blank'>
				<img src="http://www.sunmaxxsolar.com/wp-content/themes/SunMaxxSolar/images/refprojects-commercial.jpg" alt="Commercial SunMaxx Solar Thermal Reference Projects" />
                <span>Commercial Reference Projects</span>
            </a></li>
            <li><a href='http://www.sunmaxxsolar.com/government-military-solar-thermal-reference-projects.php' target='_blank'>
				<img src="http://www.sunmaxxsolar.com/wp-content/themes/SunMaxxSolar/images/refprojects-govt.jpg" alt="Government &amp; Military SunMaxx Solar Thermal Reference Projects" />
                <span>Gov't &amp; Military Reference Projects</span>
            </a></li>
            <li><a href='http://www.sunmaxxsolar.com/diy-solar-thermal-reference-projects.php' target='_blank'>
				<img src="http://www.sunmaxxsolar.com/wp-content/themes/SunMaxxSolar/images/refprojects-diy.jpg" alt="DIY Do-It-Yourself SunMaxx Solar Thermal Reference Projects" />
                <span>Do-It-Yourself Reference Projects</span>
            </a></li>
			<div style='width: 100%; height: 0px; clear: both;'></div>
        </ul>
	</div>
    
    <div style='width: 45%; float: left; margin: 0px;'>
    	<h3>Recent SunMaxx Dealer Newsletters | <span><!--<a href='#' target='_blank'>View All</a>--></span></h3>
        <ul class='vertlist'>
        <?php
			$catquery = new WP_Query( 'cat=291&posts_per_page=50' );
			while($catquery->have_posts()) : $catquery->the_post();
		?>
        	<li><a href='<?php the_permalink(); ?>' target='_blank' style="height:20px;line-height:20px;">
                <span>SunMaxx Dealer Newsletter | <?php meta('NLMonth');?> <?php meta('NLDay'); ?>, <?php meta('NLYear'); ?></span>
            </a></li>
        <?php endwhile; ?>
        </ul>
    </div>
    
    <div style='width: 45%; float: right; margin: 0px;'>
    	<h3>Recent SunMaxx FAQs &amp; Tech Tips | <span><a href='http://www.sunmaxxsolar.com/technical-tips.php' target='_blank'>View All</a></span></h3>
        <ul class='vertlist'>
        <?php
			$catquery = new WP_Query( 'cat=4&posts_per_page=4' );
			while($catquery->have_posts()) : $catquery->the_post();
		?>
        	<li><a href='<?php the_permalink(); ?>' target='_blank'>
            	<?php if(has_post_thumbnail()) { echo the_post_thumbnail();
					} elseif (get_post_meta($post->ID, "MainImg", true)) { include('pr-thumb-image-2.php') ;
					} else {
						include('pr-thumb-image.php') ;
					}
				?>
                <span><?php the_title(); ?></span>
            </a></li>
        <?php endwhile; ?>
        </ul>
        
        <h3>Recent SunMaxx Press Releases | <span><a href='http://www.sunmaxxsolar.com/sunmaxx-solar-hot-water-news-events.php' target='_blank'>View All</a></span></h3>
        <ul class='vertlist'>
        <?php
			$catquery = new WP_Query( 'cat=11&posts_per_page=4' );
			while($catquery->have_posts()) : $catquery->the_post();
		?>
        	<li><a href='<?php the_permalink(); ?>' target='_blank'>
            	<?php if(has_post_thumbnail()) { echo the_post_thumbnail();
					} elseif (get_post_meta($post->ID, "MainImg", true)) { include('pr-thumb-image-2.php') ;
					} else {
						include('pr-thumb-image.php') ;
					}
				?>
                <span><?php the_title(); ?></span>
            </a></li>
        <?php endwhile; ?>
        </ul>
    </div>
    
    <div style='width: 1px; height: 500px; background-color: #cccccc; margin-left: auto; margin-right: auto;'></div>
    <?php } ?>

</div>

<?php include ('footer-blank.php'); ?>